#!/bin/sh
# Init script to start, stop and restart tee-supplicant

killproc() {
        pid=`/bin/pidof $1`
        [ "$pid" != "" ] && kill $pid
}

case "$1" in
  start)
	echo "Starting tee-supplicant"
        /usr/bin/tee-supplicant &
  ;;

  stop)
        echo "Stopping tee-supplicant"
        killproc tee-supplicant
  ;;

  restart)
	$0 stop
        sleep 1
        $0 start
  ;;

  *)
        echo "usage: $0 { start | stop | restart }"
  ;;
esac

exit 0
